//
//  UIView+XMCommon.h
//  XunMi
//
//  Created by MacBook on 2024/2/18.
//  Copyright © 2024 TieZhu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, XMShadowPathType) {
    XMShadowPathTop,
    XMShadowPathBottom,
    XMShadowPathLeft,
    XMShadowPathRight,
    XMShadowPathCommon,
    XMShadowPathAround
};

NS_ASSUME_NONNULL_BEGIN


@interface UIView (XMCommon)

+ (instancetype)viewFromXib;

+ (CAShapeLayer *)xm_viewClipRect:(CGRect)viewRect rectCorner:(UIRectCorner)rectCorner cornerRadii:(CGSize)cornerRadii;

- (void)radiusWithRadius:(CGFloat)radius corner:(UIRectCorner)corner;


- (void)viewShadowPathWithColor:(UIColor *)shadowColor
                  shadowOpacity:(CGFloat)shadowOpacity
                   shadowRadius:(CGFloat)shadowRadius
                 shadowPathType:(XMShadowPathType)shadowPathType
                shadowPathWidth:(CGFloat)shadowPathWidth;
@end

NS_ASSUME_NONNULL_END
